<template>
	<view>
<!-- 		<u-navbar :background="background" :borderBottom="false">
			<view class="ft_16 fw-b">
				我的团队
			</view>
		</u-navbar> -->
		<view class="content">
			<view class="con_1 display">
				<image :src="info.avatar" mode=""></image>
				<view class=" p_left_10">
					<view class="p_bottom_10">
						<text class="p_right_10 ft_18 fw-b">{{info.nickname}}</text>
						<!-- <text class="font">{{userinfo.mobile}}</text> -->
					</view>
					<view class="ft_12 c-999">
						我的邀请人：{{info.p_name?info.p_name:'无'}}
					</view>
				</view>
			</view>
			<view class="tuiTeam fw-b ft_18">我的团队</view>
			<view class="con_3">
				<view class="" >
					<view class="display xiajilist" v-for="(item,index) in xiajiuser" :key="index">
						<view class="">
							<image :src="item.avatar"></image>
						</view>
						<view class="p_left_10 ft_12 c-999" style="line-height: 1.8em;">
							<view class=" c-333">
								<text class="p_right_10 fw-b ft_14">{{item.nickname}}</text>
								<!-- <text>{{item.mobile}}</text> -->
							</view>
						</view>
					</view>
				</view>
				
			</view>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background:{backgroundColor: '#ffffff',},
				userinfo:{},
				tabs:0, //选择下级
				info:'',
				xiajiuser:[], //下级列表
				role_type:"",//入驻身份  1/2/3  经销商/门店/体彩店
				
			}
		},
		onLoad() {
			this.getUser()
			this.getmyTeam() //获取我的团队
			// this.role_type=this.$all.getData('user').role_type
			console.log(this.role_type);
		},
		methods: {
			getmyTeam(){ //获取我的团队
				// this.$myRequest('user/team',{})
				// .then(res=>{
				// 	console.log(res.data);
				// 	if(res.data.code==1){
				// 		this.userinfo=res.data.data.user //用户信息
				// 		this.xiajiuser=res.data.data //收入
				// 	}
				// })
				this.$myRequest({
					url: 'api/user/tui_list',
					method:'POST',
				}).then(res => {
					if(res.data.code==1){
						// this.userinfo=res.data.data.user //用户信息
						this.xiajiuser=res.data.data.data //收入
					}
				})
			},
			getUser(){
				this.$myRequest({
					url: 'api/user/index',
					method:'POST',
				}).then(res => {
					console.log(res.data);
					if(res.data.code==1){
						let data=res.data.data
						this.info = data.info
					}
				})
			},
			selectTab(e){ //选择tab
				this.tabs=e
			},
		}
	}
</script>

<style lang="scss">
page{
	background-color: #fafafa;
}
.content{
	padding-top: 10px;
	.con_1{
		padding: 15px;
		background-color: #FFFFFF;
		margin-bottom: 5px;
		image{
			width: 60px;height: 60px;border-radius: 50%;
		}
	}
	.con_2{
		background-color: #FFFFFF;
		.active{
			width: 50%;padding: 10px 0;border-bottom: 3px solid #FF9101;text-align: center;color: #FF9101;font-weight: bold;
		}
		.noactive{
			width: 50%;padding: 10px 0;border-bottom: 3px solid #FFFFFF;text-align: center;
		}
		
	}
	.con_3{
		padding: 0 15px;background-color: #FFFFFF;
		.xiajilist{
			padding: 20px 0;border-bottom: 1px solid #eeeeee;align-items: flex-start;
			image{
				width: 50px;height: 50px;border-radius: 50%;
			}
		}
	}
	
}
.font{
	font-size: 14px;
	font-family: PingFang SC;
	font-weight: 500;
	line-height: 20px;
	color: #262524;
	margin-left: 20rpx;
}
.fw-b{
	font-weight: bold;
}
.p_left_10{
	padding-left: 10px;
}
.ft_12{
	font-size: 12px;
}
.ft_18{
	font-size: 18px;
}
.c-999{
	color: #999;
}
.p_bottom_10{
	padding-bottom: 10px;
}
.middle{
	margin: 24rpx 0;
	height: 55px;
	background: #fff;
	padding: 30rpx;
	display: flex;
	justify-content: space-between;
	text-align: left;
	view{
		width: 55%;
	}
	.price{
		font-size: 20px;
		font-family: DIN;
		font-weight: 500;
		line-height: 24px;
		color: #333333;
		margin-bottom: 10rpx;
	}
	.priceText{
		font-size: 12px;
		font-family: PingFang SC;
		font-weight: 500;
		line-height: 17px;
		color: #000000;
	}
}
.tuiTeam{
	width: 90%;
	margin: 40rpx auto;
}
</style>
